
import { request } from "../../request/index.js";
import regeneratorRuntime from "../../lib/runtime/runtime.js";
import {login} from "../../utils/asyncWx.js";

Page({
  // 获取用户信息
 async handelGetUserInfo(e){
    //  console.log(e);
    // 获取用户信息
    const { encryptedData, rawData, signature, iv} = e.detail;
    const {code} = await login();
   const loginParams = { encryptedData, rawData, signature, iv,code};
    // console.log(code);
    // 发送请求,获取token
   const res = await request({ url:"/users/wxlogin",data:loginParams,method:"post"});
   console.log(res);
  }
})